﻿@model TagEditorViewComponent.TagEditorViewModel

@using Volo.CmsKit.Admin.Web.Pages.CmsKit.Tags.Components.TagEditor
@using Volo.CmsKit.Localization
@using Microsoft.Extensions.Localization

@inject IStringLocalizer<CmsKitResource> L

    <form class="tag-editor-form" data-entity-id="@Model.EntityId" data-entity-type="@Model.EntityType">

        <div class="mb-3">
            <label class="form-label">@L["Tags"]</label>
            <input name="tags" value="@string.Join(',', Model.Tags.Select(s => s.Name))" class="form-control"/>
            <div class="form-text">@L["TagsHelpText"]</div>
        </div>

        @if (Model.DisplaySubmitButton)
        {
            <abp-row>
                <abp-button type="submit" text="@L["Submit"]" />
            </abp-row>
        }
    </form>